<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.cms.*" %>

<%@ include file="../init_include.jsp" %>

<%
	int check_rst=Permission.accept(dbi,session,request,"sysop","tree","catid","000001000"); 	
	if (check_rst!=Permission.CHECK_RST_SUCCESS) {
		dbi.closeAll();
		if (check_rst==Permission.CHECK_RST_DENY)
			response.sendRedirect("../deny.html");
		else
			response.sendRedirect("../index.jsp");
		return;		
	}
	
	if(request.getParameter("id")!=null)
	{
		String iditem=request.getParameter("id").trim();
		iditem=iditem.substring(0,iditem.length()-1);
		String sql = "delete from tablename where first_field in (" + iditem + ")";
		if(dbi.execute(sql)) {
	%>
	<%=Language.getNameByCode("sys.deletesuccessful","Delete data successfully!")%>		
	<script Language="JavaScript" src="../script/Ion_Show.js"></script> 
	<script language="javascript">
		closewindow(0);
	</script>	
	<%	
		} else {
			out.print(Language.getNameByCode("sys.deletefailed","Delete data fail!"));		
		}
	}
%>
<%@ include file="../init_free.jsp" %>
